﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Meraz.Core.Model;

namespace Meraz.Core.Managers
{
    public interface IOptionManager
    {
        IEnumerable<Option> GetTwitterGenres(string selection);
        IEnumerable<Option> GetTones(string selection);
    }
    public class OptionManager : IOptionManager
    {
        public IEnumerable<Option> GetTwitterGenres(string selection)
        {
            List<Option> list = new List<Option>();
            foreach (string genre in Enum.GetNames(typeof(TwitterGenreType)))
                list.Add(new Option() { Text = genre, Value = genre, IsSelected = (genre == selection) });
            return list;
        }
        public IEnumerable<Option> GetTones(string selection)
        {
            List<Option> list = new List<Option>();
            foreach (string tone in Enum.GetNames(typeof(ToneType)))
                list.Add(new Option() { Text = tone, Value = tone, IsSelected = (tone == selection) });
            return list;
        
        }
    }
}
